package com.lyf.juc.learn.sggadvance.future.demo;

import java.util.Random;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

/**
 * @author LYF
 * @date 2022/7/1
 */
public class NetMallServiceImpl implements NetMallService{

    // mock---
    @Override
    public double getPrice(String netMallName, String bookName) {
        try {
            TimeUnit.SECONDS.sleep(1);
        }catch (Exception e){
            e.printStackTrace();
        }
        return new Random().nextDouble()*2+netMallName.charAt(0)+bookName.charAt(0);
    }


}
